/**
 * Copyright &copy; 2012-2016 <a href="https://www.kaaction.com">KAA</a> All rights reserved All rights reserved.
 */
package com.kaaction.modules.market.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.kaaction.common.persistence.Page;
import com.kaaction.common.service.CrudService;
import com.kaaction.modules.market.entity.EventChannel;
import com.kaaction.modules.market.dao.EventChannelDao;

/**
 * 活动与渠道Service
 * @author zengbiao
 * @version 2017-04-20
 */
@Service
@Transactional(readOnly = true)
public class EventChannelService extends CrudService<EventChannelDao, EventChannel> {

	public EventChannel get(String id) {
		return super.get(id);
	}
	
	public List<EventChannel> findList(EventChannel eventChannel) {
		return super.findList(eventChannel);
	}
	
	public Page<EventChannel> findPage(Page<EventChannel> page, EventChannel eventChannel) {
		return super.findPage(page, eventChannel);
	}
	
	@Transactional(readOnly = false)
	public void save(EventChannel eventChannel) {
		super.save(eventChannel);
	}
	
	@Transactional(readOnly = false)
	public void delete(EventChannel eventChannel) {
		super.delete(eventChannel);
	}

	public List<EventChannel> findListByEventId(String eventId) {
		return super.dao.findListByEventId(eventId);
	}
	
	@Transactional(readOnly = false)
	public void deleteByEventId(String eventId) {
		super.dao.deleteByEventId(eventId);
	}

	public EventChannel getByEventAndChannel(String eventId, String channelId) {
		return super.dao.getByEventAndChannel(eventId, channelId);
	}
	
}